home *** CD-ROM | disk | FTP | other *** search
Wrap
global gRecipeWindow, gOldRecipeRect on closeWindow end on openWindow global gIngredients, gRecipes, gUserTips, gScroller, gRecipeNameSprite, gQuickWidth gRecipeNameSprite = sprite(21) gScroller = sprite(22) if voidp(gRecipes) then gRecipes = getOldRecipesDB() end if if voidp(gIngredients) then gIngredients = getOldIngredientsDB() end if if voidp(gUserTips) then gUserTips = getOldUserTipsDB() end if if (the activeWindow).rect.width = gQuickWidth then go("QuickView") else refreshRecipeWindow() end if resetCursor() end on checkElapsedTime end on startMovie global gFullWidth, gQuickWidth, gFullHeight, gSecretHelp if FileExists(gSecretHelp) and not authoring() then castLib("help_graphics").fileName = gSecretHelp end if gFullWidth = 321 gQuickWidth = 148 gFullHeight = 237 if voidp(gRecipeWindow) then gRecipeWindow = the activeWindow end if openWindow() set the mouseDownScript to "resetFocusMouseDown" set the mouseUpScript to "resetFocusMouseUp" end on stopMovie end on clearAllText debugAlert("This should not be called during a projector") repeat with patronNum = 1 to 3 setRecipePatronName(patronNum, "No Patron") setRecipeDrinkName(patronNum, "No Drink") temp = "Please refresh the Recipe Book window to see the correct recipe description for Patron" && patronNum setRecipeFullText(patronNum, temp) end repeat setRecipeQuickText(findActiveRecipeSlot(), "Please refresh the Recipe Book window to see the updated QuickView ingredient list.") end on adjustWindowWidth diffH, diffV if not (diffH or diffV) then exit end if newRect = duplicate((the activeWindow).rect) if diffH then newRect.right = (the activeWindow).rect.right - diffH end if if diffV then newRect.bottom = (the activeWindow).rect.bottom - diffV end if (the activeWindow).rect = newRect end on fullSize global gFullWidth, gFullHeight adjustWindowWidth((the activeWindow).rect.width - gFullWidth, (the activeWindow).rect.height - gFullHeight) end on fullView global gLastCurrent slotNum = gLastCurrent if not isVisible(the activeWindow) then exit end if recipeID = currentRecipe() if recipeID > 0 then recipeInfo = createRecipe(recipeID) fullText = recipeInfo[#text] drinkName = recipeInfo[#name] else fullText = noRecipeText(slotNum) quickText = noRecipeText(slotNum, 1) drinkName = "No Drink" end if setRecipeDrinkName(slotNum, drinkName, 0) setRecipeFullText(slotNum, fullText, 0) setRecipePatronName(slotNum, currentName(), 0) end on setRecipeFullText patronNum, newText global gRecipeWindow memName = "curRecipeQuantities" & patronNum setRecipeText(memName, newText, noRecipeText(patronNum), 1) end on setRecipeQuickText barSlot, newQuickText if barSlot = findActiveRecipeSlot() then setRecipeText("QuickRecipe", newQuickText, member("QuickRecipe").text, 1) end if end on noRecipeText patronNum, quickFlag global gBarTopManager if quickFlag then return "The customer has not ordered a drink yet." else if voidp(gBarTopManager) then return "No recipe available" else if inRecipeMode() then return "The customer has not ordered a drink yet." & RETURN & RETURN & "After checking the customer's ID, click the Take Order button at the bottom of the screen to take the customer's order, which will appear in place of this text. In Recipe Practice Mode, you'll choose the recipe from the alphabetical list under the red 'A-Z' tab. In the normal game play mode, use the Take Order button to take the customer's order." else if gBarTopManager.pBarSpots[patronNum][#charCode] = #none then return "There is no customer standing at the bar in position" && patronNum & ". Switch to another customer by clicking on the customer's name in the upper right of this window or using the 1, 2, 3, or Tab keys on the keyboard." else return "The customer has not ordered a drink yet." & RETURN & RETURN & "After checking the customer's ID, click the Take Order button at the bottom of the screen to take the customer's order, which will appear in place of this text. Use the Exit button at the upper right of this Recipe Book window to close it. Use the Recipe Book icon at the bottom of the screen to re-open the Recipe Book to this page." end if end if end if end if end on refreshHelpItem itemCode global gScroller, gLastLabel, gPlayerTipsThisLevel if gLastLabel <> "Help2" then exit end if newName = getname(itemCode) newText = getHelpDesc(itemCode) if itemCode = #tipregister then newText = "The tip register displays your cumulative tip earnings. You will earn larger tips by taking customers' orders and mixing their drinks in a timely fashion, using the correct ingredients in the proper amounts, and giving out drink tickets." newText = newText & RETURN & RETURN & "Tips earned this shift: " && "$" && string(gPlayerTipsThisLevel) & RETURN if inRecipeMode() then else newText = newText & "Minimum tips needed to advance:" && "$" && currentLevel(#MINTIPS) & RETURN newText = newText & "Advance early if you earn: " && "$" && currentLevel(#MAXEARLYTIPS) end if else if itemCode = #progmeter then if inRecipeMode() then maxTime = "No limit" timeLeft = "No limit" else maxTime = displayTimeUnits(maxTimeOnThisLevel()) timeLeft = displayTimeUnits(timeLeftOnThisLevel()) end if newText = newText & RETURN & RETURN & "Max time on this level: " && maxTime & RETURN newText = newText & "Elapsed time on this level: " && displayTimeUnits(timeOnThisLevel()) & RETURN newText = newText & "Time left on this level: " & timeLeft end if end if if not voidp(newName) then sendSprite(gScroller.spriteNum - 1, #mRefresh, newName) end if if not voidp(newText) then sendSprite(gScroller.spriteNum, #mRefresh, newText) end if if the number of member ("hpg_" & itemCode) > 1 then newPict = member("hpg_" & itemCode) else if isSodaIngredient(itemCode) then newPict = member("hpg_sodagun") else if isXbottleIngredient(itemCode) or (itemCode = #other) then newPict = member("hpg_xbottle") else newPict = VOID end if end if end if if not voidp(newPict) then sendSprite(gScroller.spriteNum - 2, #mRefresh, newPict) end if updateStage() end on customHelpTopic helpTopic, dontForce global gUserTips, gHelpTopicNumber lastHelpTopic = gHelpTopicNumber if integerp(helpTopic) then if helpTopic > count(gUserTips) then return 0 end if end if case helpTopic of #X, #Xbottle: gHelpTopicNumber = 1 #Soda, #sodagun: gHelpTopicNumber = 2 #Twist: gHelpTopicNumber = 3 #coatandrim: gHelpTopicNumber = 4 otherwise: gHelpTopicNumber = helpTopic end case if dontForce and (gHelpTopicNumber = lastHelpTopic) then return 0 end if if (gHelpTopicNumber < 0) or (gHelpTopicNumber > count(gUserTips)) then return 0 end if newName = replaceAltOption(gUserTips[gHelpTopicNumber][#tipName]) newHelp = replaceAltOption(gUserTips[gHelpTopicNumber][#tipText]) customHelpItem(newName, newHelp) return 1 end on customHelpItem newName, newText global gScroller, gLastLabel goToLabel("Help") if not voidp(newName) then sendSprite(gScroller.spriteNum - 1, #mRefresh, newName) end if if not voidp(newText) then sendSprite(gScroller.spriteNum, #mRefresh, newText) end if sendSprite(gScroller.spriteNum - 2, #mRefresh, member("hpg_xbottle")) updateStage() end on recipeWindowLabel global gLastLabel return gLastLabel end on goToLabel dest global gLastLabel if not (integerp(dest) or (label(dest) > 0)) then exit end if pageSound() if dest = "QuickView" then else fullSize() end if gLastLabel = dest if (label(dest) > 0) or integerp(dest) then go(dest) end if end on quickView global gQuickWidth, gLastCurrent if not isVisible(the activeWindow) then exit end if gLastCurrent = findActiveRecipeSlot() slotNum = gLastCurrent recipeID = currentRecipe() if recipeID > 0 then recipeInfo = createRecipe(recipeID) quickText = recipeInfo[#quickView] recipeName = recipeInfo[#name] else quickText = noRecipeText(slotNum, 1) recipeName = "No Drink" end if setRecipeDrinkName(slotNum, recipeName, 0) setRecipeQuickText(slotNum, quickText, 0) setRecipePatronName(slotNum, currentName(), 0) quickHeight = 80 + member("QuickRecipe").rect.height adjustWindowWidth((the activeWindow).rect.width - gQuickWidth, (the activeWindow).rect.height - quickHeight) end on helpUserWithThisIngredient pSpr, rawIngredients global gToolTip if paused() then exit end if ingredients = [] repeat with X = 1 to count(rawIngredients) thisIng = findingredientbyid(rawIngredients[X][#INGID]) cat = getCategory(thisIng) if (cat >= 2) and (cat <= 9) then add(ingredients, thisIng) end if end repeat X = PointToLine(pSpr, the mouseLoc) if (X > 0) and (X <= count(ingredients)) then ingredient = ingredients[X] return [X, ingredient] else return [0, VOID] end if end